#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("lottery.in" , "r" , stdin);
	freopen("lottery.out" , "w" , stdout);
	int win , m , a[105];
	cin >> m;
	for(int i = 1 ; i <= m ; i++){
		cin >> a[i];
	}
	cin >> win;
	int flag = 0;
	for(int i = 1 ; i <= m ; i++){
		if(a[i] == win){
			cout << i << endl;
			flag = 1;
			break;
		}
	}
	if(flag == 0){
		cout << "0" << endl;
	}
	return 0;
}